package com.hspedu.homework.homework08;

/**
 * @author 谷其昊
 * @version 1.0
 * @date 2022/1/24
 * @time 19:38
 */
public class BankAccount {
    private double balance;
    public BankAccount(double initialBalance){
        this.balance = initialBalance;
    }

    public void deposit(double amount){
        balance += amount;
    }

    public void withdraw(double amount){
        balance -= amount;
    }



    public double getBalance() {
        return balance;
    }

    public void setBalance(double balance) {
        this.balance = balance;
    }
}
